package com.ruoyi.web.controller.job;

import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.request.AppNextStepRequest;
import com.ruoyi.system.service.AppNextStepService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("app/next/step")
public class AppNextStepController {
    @Resource
    private AppNextStepService appNextStepService;

    @PostMapping
    public AjaxResult nextStep(@RequestBody AppNextStepRequest appNextStepRequest) {
        AjaxResult ajaxResult = appNextStepService.nextStep(appNextStepRequest);
        log.info("查询下一个审批流程 参数:{} 结果:{}", JSON.toJSONString(appNextStepRequest), JSON.toJSONString(ajaxResult));
        return ajaxResult;
    }

}
